import { Component, Output, EventEmitter } from '@angular/core';
import { NgProgress } from 'ngx-progressbar';

@Component({
    selector: 'loader',
    templateUrl: './loader.component.html'
})
export class LoaderComponent {

    constructor(private progress: NgProgress) { }

    public start(): void {     
        this.progress.start();
    }

    public end(): void {
        this.progress.done();
    }

    public set(value: number): void {
        this.progress.set(value);
    }

    public increase(value: number): void {
        this.progress.inc(value);
    }    
}